#include <iostream>

using namespace std;

class A {
    char a;
    int b;
    double c;
public:
    //void show(A *this)
    A()
    {}
    A(char a, int b, double c)
    {
	    this->a = a;
	    this->b = b;
	    this->c = c;
    }
    ~A()
    {
    }
    void set()
    {}
    void show()
    {
	    cout << "call show:" << this << endl;
	    cout << this->a << "," << this->b <<"," <<  this->c << endl;
    }
};

A gobj;

int main()
{
	A obj1('a', 10, 5.67), obj2('x', 15, 8.67);
	A *pa = new A('c', 5, 1.2);
	cout << "the address of gobj:" << &gobj << endl;
	cout << "the address of obj1:" << &obj1 << endl;
	cout << "the address of obj2:" << &obj2 << endl;
	cout << "the address of new A:" << pa << endl;
	cout << "the address of show:" << (void *)&A::show << endl;
	delete pa;

	cout << sizeof(obj1) << ", " << sizeof(A) << endl;

	obj1.show();
	obj2.show();
	return 0;
}


